<?php

namespace app\api\controller\product;

use think\Controller;
use think\Request;

class Detail extends Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->ProductTypeModel = model('Product.ProductType');
        $this->ProductModel = model('Product.Product');
    }

    public function info()
    {
        $id = $this->request->param('proid');
        // halt($id);
        $good = $this->ProductModel->find($id);
        // halt($good);
        if (!$good) {
            $this->error('查询商品信息失败');
        }
        $this->success('查询商品信息成功', null, $good);
    }
}
